package easy;

public class Solution_389 {

    public static char findTheDifference(String s, String t) {
        char[] chars1 = s.toCharArray();
        char[] chars2 = t.toCharArray();
        int sum = 0;
        for (int i = 0; i < chars1.length; i++) {
            sum = sum + chars2[i] - chars1[i];
        }
        sum += chars2[chars2.length-1];
        return (char)sum;
    }

    public static void main(String[] args) {
        System.out.println(findTheDifference("abcd", "abcde"));
//        System.out.println(firstUniqChar("loveleetcode"));
    }
}
